<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>weiboencryptor v1.0</title>
<style type="text/css">
body{padding: 80px;}
textarea{background: #aaeeff;margin: 2px;padding: 5px;width: 350px;height: 120px; }
</style>
<script type="text/javascript">
/**
 * weiboencryptor v1.0
 * 
 * 本程序为字符加密解密的简单工具，主要算法基于对字符的unicode编码进行加减，使得字符表面上不可读来达到躲避审查。
 * This program is a simple encrypting toolkit,based on uinicode increasing/decreasing,to make information unreadable for microblog sensation.
 
 * author: @weiboencryptor
 * e-mail: weiboencryptor@gmail.com
 */
 	var mov=1;
	function encrypt(){
		var a=document.getElementById("input1");
		var b=document.getElementById("input2");
		b.value=enc(a.value);
	}
	function decrypt(){
		var c=document.getElementById("input3");
		var d=document.getElementById("input4");
		d.value=dec(c.value);
	}
	function copy(){
		var b=document.getElementById("input2");
		var c=document.getElementById("input3");
		c.value=b.value;
	}
	function enc(str1){
		str1=str1.trim();
		var str2="";
		for(var i=0;i<str1.length;i++){
			str2+=String.fromCharCode(str1[i].charCodeAt(0)+mov);
		}
		return str2;
	}
	function dec(str1){
		str1=str1.trim();
		var str2="";
		for(var i=0;i<str1.length;i++){
			str2+=String.fromCharCode(str1[i].charCodeAt(0)-mov);
		}
		return str2;
	}
</script>
</head>
<body>
<div style="position: relative;">
	<div style="float: left;width: 35%;margin: 5%;">
		<textarea id='input1'></textarea>
		<textarea id='input2'></textarea>
		<div align="center">
			<button onclick="encrypt()">encrypt</button>
		</div>
	</div>
	<div style="float: left;position: relative;">
		<button onclick="copy()">→</button>
	</div>
	<div style="float: right;width: 35%;margin: 5%;">
		<textarea id='input3'></textarea>
		<textarea id='input4'></textarea>
		<div align="center">
			<button onclick="decrypt()">decrypt</button>
		</div>
	</div>
</div>
</body>
</html>